/*
 * Copyright Visionmax Solutions Inc. 2003-2008
 */
package com.gs2.servlet;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

public class SmtpAuthenticator extends Authenticator
{
	String user;
	String password;
	/**
	 * Constructor for SmtpAuthenticator.
	 */
	public SmtpAuthenticator()
	{
		super();
	}
	/**
	 * Constructor for SmtpAuthenticator.
	 */
	public SmtpAuthenticator(String user, String password)
	{
		super();
		this.user = user;
		this.password = password;
	}
	protected PasswordAuthentication getPasswordAuthentication()
	{
		return new PasswordAuthentication(user, password);
	}
	/**
	 * Returns the password.
	 * @return String
	 */
	public String getPassword()
	{
		return password;
	}

	/**
	 * Returns the user.
	 * @return String
	 */
	public String getUser()
	{
		return user;
	}

	/**
	 * Sets the password.
	 * @param password The password to set
	 */
	public void setPassword(String password)
	{
		this.password = password;
	}

	/**
	 * Sets the user.
	 * @param user The user to set
	 */
	public void setUser(String user)
	{
		this.user = user;
	}

}
